//package com.example.springboottemplate.Config.Netty;
//
//import io.netty.channel.ChannelHandlerContext;
//import io.netty.channel.ChannelInboundHandlerAdapter;
//import org.springframework.stereotype.Component;
//
//@Component
//public class YourCustomChannelHandler extends ChannelInboundHandlerAdapter {
//
//    @Override
//    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
//        // 处理接收到的消息
//        String message = (String) msg;
//        System.out.println("Received message: " + message);
//
//        // 这里可以添加你的业务逻辑
//
//        // 假设你要给客户端发送一个回复消息
//        String response = "Server received: " + message;
//        ctx.writeAndFlush(response);
//    }
//
//    @Override
//    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
//        // 异常处理逻辑
//        cause.printStackTrace();
//        ctx.close();
//    }
//}
